<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据_变量_内存</title>
</head>

<body>
    <script type="text/javascript">
        var age = 18
        console.log(age);

        var obj = { name: 'Tom' }
        console.log(obj.name);

        var a = { age: 12 }
        var b = a

        var a = 3
        function fn(a) {
            a = a + 1
        }
        fn(a)
        console.log('======', a);

        function fn2(obj) {
            console.log(obj.name);
            obj = { name: 'lzx' };
            console.log(obj.name);
        }
        var obj = { name: 'Tom' }
        fn2(obj)
        console.log(obj.name);
    </script>
</body>

</html>